# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=gettext-tiny
pkgver=0.3.2
pkgrel=0
pkgdesc="a software locale translation system"
url="https://github.com/sabotage-linux/gettext-tiny"
arch="all"
options="!check" # No test suite.
license="MIT"
depends=""
# Remove !gettext-dev when we drop GNU gettext.
depends_dev="musl-libintl !gettext-dev"
makedepends_build="$depends_dev"
makedepends_host=""
makedepends="$makedepends_build $makedepends_host"
install=""
subpackages="$pkgname-dev"
source="http://ftp.barfooze.de/pub/sabotage/tarballs/gettext-tiny-$pkgver.tar.xz
	respect-cflags.patch::https://patch-diff.githubusercontent.com/raw/sabotage-linux/gettext-tiny/pull/58.patch"
builddir="$srcdir/gettext-tiny-$pkgver"

build() {
	make LIBSRC=libintl/libintl-musl.c prefix=/usr
}

package() {
	make DESTDIR="$pkgdir" prefix=/usr LIBSRC=libintl/libintl-musl.c install
}

dev() {
	# when we're ready to drop GNU gettext, uncomment the below line
	# provides="gettext-dev=9999"
	default_dev
}

sha512sums="0efde2ce995c1bc5e2b983a5c83b8532cb8e99ae9043c5de7085cf550eb2c052bad4641782fb64b2bc70434844a935f0935d9f1a62954d7facbe247fe4ce1e21  gettext-tiny-0.3.2.tar.xz
61869565f3c329a43f8e2ffd3e03295a4bd0e09efb1b7905a1c48feeaef3aa77722845b9188f28849c070dbe3c64b73abd7aa1908595c36093e8778be75736db  respect-cflags.patch"
